<?php
namespace Home\Controller;
use Think\Controller;
use Home\Model\SetcardModel;
class BaseController extends Controller {
    public static  $cardtype_scan = 0;
    public static $cardtype_package = 1;
    public static $cardtype_attack = 2;
    public static $cardtype_wz = 3;

    public function __construct(){
        parent::__construct();

        //判断是否登录
        if(!isset($_SESSION['adminuser']) || empty($_SESSION['adminuser']))
        {
            session(null);
            header("Location: " . C("BASE_URL") . "/Login/login");
            exit;
        }

        $Setcardinfo=new SetcardModel();
        $Setcardinfodata=$Setcardinfo->getSetcard();
        if($Setcardinfodata==false){

        }
        else {
            $_SESSION['cardinfo'] = $Setcardinfodata;
        }
    }
}